home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 2
/
Atari Mega Archive CD - Volume 2.iso
/
minix
/
up1510b.tgz
/
up1510b
/
src
/
kernel
/
stprint.c.D
< prev
next >
Wrap
Text File
|
1990-07-25
|
5KB
|
193 lines
*** /tmp/,RCSt1022338 Wed Jul 25 13:56:10 1990
--- stprint.c Mon Jul 23 22:35:31 1990
***************
*** 1,2 ****
! #ifdef ATARI_ST
/* This file contains the printer driver for the Atari ST.
--- 1,2 ----
! #if (CHIP == M68000)
/* This file contains the printer driver for the Atari ST.
***************
*** 8,10 ****
*
! * TTY_O_DONE: output completed
* TTY_WRITE: a process wants to write on a terminal
--- 8,10 ----
*
! * HARD_INT: output completed
* TTY_WRITE: a process wants to write on a terminal
***************
*** 14,16 ****
* -------------------------------------------------------
! * | TTY_O_DONE |minor dev| | | |
* |-------------+---------+---------+---------+---------|
--- 14,16 ----
* -------------------------------------------------------
! * | HARD_INT |minor dev| | | |
* |-------------+---------+---------+---------+---------|
***************
*** 26,35 ****
! #include "../h/const.h"
! #include "../h/type.h"
! #include "../h/callnr.h"
! #include "../h/com.h"
! #include "../h/error.h"
! #include "const.h"
! #include "type.h"
! #include "glo.h"
#include "proc.h"
--- 26,30 ----
! #include "kernel.h"
! #include <minix/callnr.h>
! #include <minix/com.h>
#include "proc.h"
***************
*** 40,41 ****
--- 35,43 ----
+ static void do_write();
+ static void do_done();
+ static void do_cancel();
+ static void reply();
+ static void outc();
+ void piaint();
+
#define CANCELED -999 /* indicates that command has been killed */
***************
*** 52,54 ****
*===========================================================================*/
! PUBLIC printer_task()
{
--- 54,56 ----
*===========================================================================*/
! PUBLIC void printer_task()
{
***************
*** 61,63 ****
case CANCEL : do_cancel(&m); break;
! case TTY_O_DONE: do_done(&m); break;
default: break;
--- 63,65 ----
case CANCEL : do_cancel(&m); break;
! case HARD_INT : do_done(&m); break;
default: break;
***************
*** 71,73 ****
*===========================================================================*/
! PRIVATE do_write(mp)
register message *mp;
--- 73,75 ----
*===========================================================================*/
! PRIVATE void do_write(mp)
register message *mp;
***************
*** 76,78 ****
register struct proc *rp;
- extern phys_bytes umap();
--- 78,79 ----
***************
*** 115,117 ****
*===========================================================================*/
! PRIVATE do_done(mp)
message *mp;
--- 116,118 ----
*===========================================================================*/
! PRIVATE void do_done(mp)
message *mp;
***************
*** 125,127 ****
--- 126,131 ----
return;
+ #if 0
status = (mp->REP_STATUS == OK ? orig : EIO);
+ #endif
+ status = orig;
reply(REVIVE, caller, procno, status);
***************
*** 135,137 ****
*===========================================================================*/
! PRIVATE do_cancel(mp)
message *mp; /* pointer to the newly arrived message */
--- 139,141 ----
*===========================================================================*/
! PRIVATE void do_cancel(mp)
message *mp; /* pointer to the newly arrived message */
***************
*** 146,149 ****
left = 0; /* causes printing to stop at next interrupt*/
- procno = CANCELED; /* marks process as canceled */
reply(TASK_REPLY, mp->m_source, mp->PROC_NR, EINTR);
}
--- 150,153 ----
left = 0; /* causes printing to stop at next interrupt*/
reply(TASK_REPLY, mp->m_source, mp->PROC_NR, EINTR);
+ procno = CANCELED; /* marks process as canceled */
}
***************
*** 154,156 ****
*===========================================================================*/
! PRIVATE reply(code, replyee, process, status)
int code; /* TASK_REPLY or REVIVE */
--- 158,160 ----
*===========================================================================*/
! PRIVATE void reply(code, replyee, process, status)
int code; /* TASK_REPLY or REVIVE */
***************
*** 175,177 ****
*===========================================================================*/
! PUBLIC piaint()
{
--- 179,181 ----
*===========================================================================*/
! PUBLIC void piaint()
{
***************
*** 181,184 ****
*/
- static message m;
-
if (busy == FALSE) {
--- 185,186 ----
***************
*** 197,202 ****
}
!
! m.m_type = TTY_O_DONE;
! m.REP_STATUS = OK;
! interrupt(PRINTER, &m);
}
--- 199,201 ----
}
! interrupt(PRINTER);
}
***************
*** 204,206 ****
! PRIVATE outc(c)
{
--- 203,206 ----
! PRIVATE void outc(c)
! int c;
{
***************
*** 230,232 ****
#ifdef DEBOUT
! PUBLIC prtc(c)
{
--- 230,233 ----
#ifdef DEBOUT
! PUBLIC void prtc(c)
! int c;
{
***************
*** 249,250 ****
#endif
! #endif ATARI_ST
--- 250,251 ----
#endif
! #endif